Skip to content

[9.4] (backport #17477) Fix "occured" typo in the Windows service install template - #17501

Merged
ebeahan merged 1 commit into
9.4from
mergify/bp/9.4/pr-17477
Oct 23, 2026
Merged

ebeahan merged 1 commit into
9.4from
mergify/bp/9.4/pr-17477

Conversation

@mergify

@mergify mergify Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Related issues

The three docs items from the same issue are in #17476. They're split so that PR stays docs-only and skips buildkite; dev-tools/ matches none of the skip_ci_on_only_changed patterns, so this one cannot. #17382 should stay open until both land.

Risk

  • Low: isolated change, no effect on Fleet connectivity, policy handling, or upgrades
  • Medium: changes existing behavior, but is feature flagged or a failure does not affect Fleet connectivity, policy handling, or upgrades
  • High: touches Fleet connectivity, policy application, upgrade/rollback, installation, or changes defaults for existing users

One word inside a double-quoted string passed to Write-Host. No control flow, no PowerShell syntax, and no template placeholder is touched.

Rationale

dev-tools/packaging/templates/windows/install-service.ps1.tmpl:20 is the Catch branch of the delayed-start configuration step:

Try {
  Start-Process -FilePath sc.exe -ArgumentList 'config {{.BeatName}} start= delayed-auto'
}
Catch { Write-Host -f red "An error occured setting the service to delayed start." }

occured → occurred. It is printed in red to the console on a real failure, so it's the line an operator reads while something is already going wrong.

Rollout and safety

N/A — a string literal in console output. The Try/Catch structure, the sc.exe invocation and the {{.BeatName}} placeholder are unchanged, so rendering and runtime behavior are identical. Nothing is persisted or parsed, so there is no downgrade or rollback concern.

Testing

No automated coverage exists for this message, and I could not render the template locally: go build ./internal/... fails here because the beats submodule is not initialized, so the ./beats replace directive cannot resolve. I'm not claiming a build.

What I did verify:

  • The edit is confined to the contents of one double-quoted string. The diff is a single line, and the surrounding Try/Catch and -f red arguments are byte-identical.
  • No Go template delimiters ({{/}}) appear in the changed string, so template rendering is unaffected.
  • Repository-wide search for other user-facing occured: this was the only hit outside Go identifiers. The remaining ones are LogWatcher.KeyOccured and keysOccured in pkg/testing/log_watcher.go:52-93 plus a call site in testing/integration/ess/otel_test.go:768. I left those alone deliberately — KeyOccured is exported, so renaming it is an API change rather than a text fix, and none of it is user-visible.
  • For reviewers wondering where the rendered script lands: the only in-repo reference to install-service.ps1 is specs/apm-server.spec.yml:4, which lists it as a component file. The template is rendered by the shared beats packaging machinery, which lives outside this repo, so I could not trace the render step here.

A one-word fix to an error message isn't release-note material, so I'd suggest the skip-changelog label rather than a changelog fragment — but happy to add a fragment instead if you'd rather have the entry.

🤖 Generated with Claude Code


This is an automatic backport of pull request #17477 done by [Mergify](https://mergify.com).

Relates to #17382 (item 4).

The delayed-start failure path in
dev-tools/packaging/templates/windows/install-service.ps1.tmpl printed
"An error occured setting the service to delayed start." Corrected to
"occurred".

Co-authored-by: Anshuman-Prakash <199287261+Anshuman-Prakash@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Eric Beahan <eric.beahan@elastic.co>
(cherry picked from commit 0b131a6)
@mergify
mergify Bot requested a review from a team as a code owner October 23, 2026 21:23
@mergify mergify Bot added the backport label Oct 23, 2026
@mergify
mergify Bot requested review from macdewee and removed request for a team October 23, 2026 21:23
@ebeahan
ebeahan enabled auto-merge (squash) October 23, 2026 21:24
@github-actions

Copy link
Copy Markdown
Contributor

Dependency review finished without posting an analysis comment.

If you expected a review, push a new commit to this pull request (or close and reopen it) to try again.

Workflow run: https://github.com/elastic/elastic-agent/actions/runs/40026473803

@ebeahan
ebeahan merged commit 5629044 into 9.4 Oct 23, 2026
42 of 43 checks passed
@ebeahan
ebeahan deleted the mergify/bp/9.4/pr-17477 branch October 23, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants